def generate(num):
    import random
    code=''
    y='23456789ABCDEFGHJKLMNabcdefghijklmn'
    for i in range(num):
       index=random.randint(0,len(y)-1)
       code+=y[index]
    return code


print(generate(4))
